export default class ProductService {
    getNodeList() {
        return fetch('/api/wwsh/node/list')
            .then((res) => res.text())
            .then((text) => {
                const rows = text.split('\n').map(row => row.trim());
                const tableData = rows.map(row => row.split(/\s+/));
                return tableData.filter(row => row.length > 1);
            });
    }
    getFileList() {
        return fetch('/api/wwsh/file/list')
            .then((res) => res.text())
            .then((text) => {
                const rows = text.split('\n').map(row => row.trim());
                const tableData = rows.map(row => row.split(/\s+/));
                return tableData.filter(row => row.length > 1);
            });
    }
}
